/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Daniela
 */

public class Pieza {
    private int X;
    private int Y;
    private boolean esX;
    private boolean esY;
    private boolean estaY;   /* Variable usada para saber si la pieza esta en el tablero */

    public Pieza(int X, int Y, boolean esX, boolean esY, boolean estaY) {
        this.X = X;
        this.Y = Y;
        this.esX = esX;
        this.esY = esY;
        this.estaY = estaY;
    }

   
    public int getX() {
        return X;
    }

    public void setX(int X) {
        this.X = X;
    }

    public int getY() {
        return Y;
    }

    public void setY(int Y) {
        this.Y = Y;
    }

    public boolean isEsX() {
        return esX;
    }

    public void setEsX(boolean esX) {
        this.esX = esX;
    }

    public boolean isEsY() {
        return esY;
    }

    public void setEsY(boolean esY) {
        this.esY = esY;
    }

    public boolean isEstaY() {
        return estaY;
    }

    public void setEstaY(boolean estaY) {
        this.estaY = estaY;
    }

    @Override
    public String toString() {
        return "Pieza " + "X= " + X + "Y= " + Y + "esX=" + esX + "esY=" + esY + "estaY=" + estaY + '\n';
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Pieza other = (Pieza) obj;
        if (this.X != other.X) {
            return false;
        }
        if (this.Y != other.Y) {
            return false;
        }
        if (this.esX != other.esX) {
            return false;
        }
        if (this.esY != other.esY) {
            return false;
        }
        if (this.estaY != other.estaY) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        return hash;
    }

   

}

